package cn.jaye.fabric.infrastructure.mybatis.impl.mapper;

import cn.jaye.fabric.common.model.SuperMapper;
import cn.jaye.fabric.domain.model.User;
import com.alibaba.fastjson.JSONArray;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author Jaye
 * @create 2018-06-04 14:38
 */
@Mapper
public interface UserMapper extends SuperMapper<User> {
    ArrayList<User> getScoreboard();

    void updateUserPoint(@Param("username") String username, @Param("point") Integer point);

    JSONArray listScore();

    Map<String, String> getMyScore(@Param("username") String username);

    JSONArray listMyGuess(@Param("username") String username);

    JSONArray listMyAllGuess(@Param("username") String username);

    JSONArray listScoreCountByDate(@Param("startDate") String startDate, @Param("endDate") String endDate);
}
